
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ include file="../common.jsp" %>
<script type="text/javascript">
		$(document).ready(function(){
			setPageTitle('<tiles:getAsString name="pageTitle"/>');
 			//createLayoutForAddOrEdit('uploadDocNorthPane','uploadDocTabs');
			$( "#linkedDocId" ).selectable();
			/* bindEventsForDocAttrDtlsPage();
			var docType = '<c:out value="${docDetailsForm.docTypeId}"></c:out>';
			if(docType!=0){
				loadDocCategory();
			} */
			/* enableDatepicker('docValidityStartDate','dd-mm-yy');
			enableDatepicker('docValidityEndDate','dd-mm-yy');
			enableDisableFields('docRenewableSelect'); */
			appInnerLayout.resizeAll();
		});
	</script>
	
<div align="center">
	<table class="bodyTable">
		<tr>
			<td>
				<table class="filtersTable zeroBorder" style="width: 100%;">
					<tr class="tableChildHeaderColor" align="left" style="width: 100%;">
						<td>
							<table style="width: 100%;" class="zeroBorder">
								<tr>
									<td style="width: 80%;">
										<table class="zeroBorder">
											<tr>
												<td class="spacingColumnWidthLess"></td>
												<td align="left">
													<img alt="" src="./customTheme/Icons/BlueLotus_DMS_icons-11.png">
												</td>
												<td class="spacingColumnWidthLess"></td>
												<td style="vertical-align: middle;"><span class="tableMainHeaderFont"> UPLOAD DOCUMENTS </span></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr class="formSpacingRow formBlockColor"><td></td></tr>
					<tr>
						<td align="center">
						<div id="uploadDocTabs" class="formBlockColor"  style="overflow: auto;">
							<c:if test="${docDetailsForm.errorCount gt 0}">
								<span class="formFont errorMsg">The screen has some errors.</span>
							</c:if>
							<form:form commandName="docDetailsForm" id="uploadNewDocForm" name="uploadNewDocForm" action="${flowExecutionUrl}" enctype="multipart/form-data" method="POST">
							<form:hidden path="originalDocTypeId" value="-1"/>
								<table style="width: 100%;" border="0" class="formTable" >
									
									<tiles:insertAttribute name="attachDoc"></tiles:insertAttribute>

									<tr class="formSpacingRow formBlockColor">
										<td colspan="9">
											<hr>
										</td>
									</tr>
									<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>	
									<tiles:insertAttribute name="attrDetails"></tiles:insertAttribute>
									<div id="dynamicMetaAttr"></div>
									<tr class="formSpacingRow formBlockColor">
										<td colspan="9">
											<hr>
										</td>
									</tr>
									<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>	
									<tiles:insertAttribute name="ownerDetails"></tiles:insertAttribute>
									
									<tr class="formSpacingRow formBlockColor">
										<td colspan="9">
											<hr>
										</td>
									</tr>
									<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>	
									<tiles:insertAttribute name="validityDetails"></tiles:insertAttribute>
									
									<tr class="formSpacingRow formBlockColor">
										<td colspan="9">
											<hr>
										</td>
									</tr>
									<tr>
										<td colspan="5"></td>
										<td colspan="3" align="right">
											<input type="reset" value="RESET" name="resetForm" class="resetButton">
											<span class="spacingColumnWidthLess">&nbsp;</span>
											<input type="hidden" value="ajaxRequest" name="ajaxSource">
											<input type="button" class="formButton ui-corner-all" value="UPLOAD" onclick="loadContentToServer('uploadNewDocForm','contentDiv')">	
										</td>
										<td class="spacingColumnWidthLess"></td>
									</tr>	
									<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>												
								</table>
							</form:form>
					</div>
						</td>
				</table>
			</td>
		</tr>
	</table>
</div>
	
	
	
	
	
	
	
	
	
	<%-- <div id="uploadDocNorthPane" class="ui-layout-north ui-widget-header">
		<table class="tabsHeaderTable" >
			<tr class="ui-corner-all">
				<td class="ui-corner-all"><span>Upload New Document</span></td>
			</tr>

		</table>
	</div>
	<div id="uploadDocTabs" class="ui-widget-content">
		<c:if test="${docDetailsForm.errorCount gt 0}">
			<span class="ui-widget errorMsg">The screen has some errors.</span>
		</c:if>
		<form:form commandName="docDetailsForm" id="uploadNewDocForm" name="uploadNewDocForm" action="${flowExecutionUrl}" enctype="multipart/form-data" method="POST">
		<form:hidden path="originalDocTypeId" value="-1"/>
			<table style="width: 90%">
				<tr class="text ui-widget text-align-right"><td colspan="23">* (All fields are mandatory)</td></tr>
				<tr>
					<td>
						<tiles:insertAttribute name="attrDetails"></tiles:insertAttribute>
					</td>
				</tr>
				<tr>
					<td>
						<div id="dynamicMetaAttr"></div>
					</td>
				</tr> 
				<tr>
					<td>
						<hr/>
						<table>
							<tiles:insertAttribute name="ownerDetails"></tiles:insertAttribute>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<hr/>
						<table>
							<tiles:insertAttribute name="validityDetails"></tiles:insertAttribute>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<hr/>
						<h5>Linked Documents</h5>
						<div id="linkedDocument">
							<ul id="linkedDocId" class="userListClass">
							<c:forEach items="${linkedDocumentMap}" var="linkedDocumentMap">
								<li id="${linkedDocumentMap.key}">${linkedDocumentMap.value}</li>
								<input type="hidden" name="linkedDocId" id="${linkedDocumentMap.key}" value="${linkedDocumentMap.key}">
							</c:forEach>
							</ul>
								<c:forEach var="linkedDocumentList" items="${linkedDocumentList}">
			     					<input type="hidden" name="oldLinkedDocument" value="${linkedDocumentList}"></input>
			    				</c:forEach>
			    			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img alt="" height="40" src="<c:url value="/search.png"></c:url>" onclick="showDocumentLookUpDialog('uploadNewDocForm');">
			    			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="Delete" onclick="deleteDocument()"/>
			    			<br><label style="font-size: 0.6em;"> Document Lookup </label>
							
						</div>
					</td>
				</tr>				
				<tr>
					<td>
						<hr/>
						<table>
							<tiles:insertAttribute name="attachDoc"></tiles:insertAttribute>
						</table>
					</td>
				</tr>
			</table>
		</form:form>
</div> --%>
